// ToolbarWindow.h: interface for the CToolbarWindow class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_TOOLBARWINDOW_H__80121EA6_44F2_4C03_A878_FEDDCD894054__INCLUDED_)
#define AFX_TOOLBARWINDOW_H__80121EA6_44F2_4C03_A878_FEDDCD894054__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <commctrl.h>
#include "resource.h"
#include "toolbar.h"

class CToolbarWindow : public CWindowImpl<CToolbarWindow>
{
public:
	DECLARE_WND_SUPERCLASS(L"IETOOLBAR", TOOLBARCLASSNAME)

	BEGIN_MSG_MAP(CToolbarWindow)
		MESSAGE_HANDLER(WM_CREATE, OnCreate)
		COMMAND_ID_HANDLER(IDC_GOTO_WEBSITE, OnGotoWebsite)
	END_MSG_MAP()

	CToolbarWindow();
	virtual ~CToolbarWindow();

	LRESULT OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnGotoWebsite(WORD wNotifyCode, WORD wID, HWND hwndCtl, BOOL& bHandled);

protected:
	VOID	ReleaseResources();
	HRESULT NavigateBrowser(BSTR targetUrl);

private:
	HIMAGELIST	  m_hImageList;
	IWebBrowser2* m_pIWebBrowser2;
};

#endif // !defined(AFX_TOOLBARWINDOW_H__80121EA6_44F2_4C03_A878_FEDDCD894054__INCLUDED_)
